﻿using Ninject.Core;
using Ninject.Core.Behavior;
using TestBat.ISettings;
using TestBat.ISettings.Database;
using TestBat.Settings;
using TestBat.Settings.Database;

namespace TestBat.GuyWire.Modules
{
    public class SettingsModule : StandardModule
    {
        public override void Load()
        {
            Bind<ISettings.IWebSettings>().To<WebSettings>();
            Bind<ISettings.IExeSettings>().To<ExeSettings>();
            Bind<IWebSettingsPersister>().To<WebSettingsPersister>().Using<SingletonBehavior>();
            Bind<IExeSettingsPersister>().To<ExeSettingsPersister>().Using<SingletonBehavior>();

            Bind<IDatabaseConnectionTester>().To<DatabaseConnectionTester>().Using<SingletonBehavior>();
            Bind<IDatabaseTypeConverter>().To<DatabaseTypeConverter>().Using<SingletonBehavior>();
            Bind<IMySQLDatabaseType>().To<MySQLDatabaseType>();
            Bind<IMSSQLDatabaseType>().To<MSSQLDatabaseType>();
        }
    }
}
